package com.example.spirngtest.spi.learn;

import java.util.ServiceLoader;

/**
 * @author 30952
 */
public class SearchDoc {

    public static void main(String[] args) {
        ServiceLoader<Search> searchServiceLoader = ServiceLoader.load(Search.class);
        for (Search search : searchServiceLoader) {
            String doc = search.searchDoc("hello word");
            System.out.println(doc);
        }
    }
}
